<?php
/**
 * Created by PhpStorm.
 * User: 咔咔
 * Date: 2020/9/21
 * Time: 15:37
 */
namespace container\dependency;

class Person
{

    public function __construct(Car $obj)
    {
        $this->obj = $obj;
    }
    
    public function buy ()
    {
        return $this->obj->pay();
    }
}